﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
//using BTGISWASECO.BusinessEntities;

/// <summary>
/// Summary description for TruHongEntities
/// </summary>
namespace BTGISWASECO.BusinessEntities
{
    public class TruHongEntities
    {
        #region khai bao thuoc tinh
        private int _objectID;
        private string _IDTruHong;
        private string _IDDMZ;
        private string _IDDMA;
        private string _KichCo;
        private string _KieuDang;
        private int _LoaiTruHong;
        private string _LoaiTruHongText;
        private int _VatLieu;
        private string _VatLieuText;
        private int _TieuChuan;
        private string _TieuChuanText;
        private int _NhanHieu;
        private string _NhanHieuText;
        private int _NhaSanXuat;
        private string _NhaSanXuatText;
        private int _NuocSanXuat;
        private string _NuocSanXuatText;
        private int _NamLapDat;
        private int _SLMiengPhun;
        private string _KCMiengPhun;
        private string _MoTaViTri;
        private int _TinhTrang;
        private string _TinhTrangText;
        private double _ApLucHD;
        private int _DonViQL;
        private string _DonViQLText;
        private string _SoNha;
        private string _MaDuong;
        private string _MaPhuong;
        private string _MaQuan;
        private int _ThuocSoHuu;
        private string _ThuocSoHuuText;
        private int _SoLanSuCo;
        private string _NguoiCNCuoi;
        private DateTime _NgayCNCuoi;
        private string _GhiChu;
        private string _IDHinhAnh;


        public string KichCo 
        {
            get { return _KichCo; }
            set { _KichCo = value; }
        }

        public string KieuDang
        {
            get { return _KieuDang; }
            set { _KieuDang = value; }
        }

        public int ThuocSoHuu
        {
            get { return _ThuocSoHuu; }
            set { _ThuocSoHuu = value; }
        }

        public string ThuocSoHuuText
        {
            get { return _ThuocSoHuuText; }
            set { _ThuocSoHuuText = value; }
        }

        public string LoaiTruHongText
        {
            get { return _LoaiTruHongText; }
            set { _LoaiTruHongText = value; }
        }

        public int LoaiTruHong
        {
            get { return _LoaiTruHong; }
            set { _LoaiTruHong = value; }
        }

        public string MaQuan
        {
            get { return _MaQuan; }
            set { _MaQuan = value; }
        }

        public string MaPhuong
        {
            get { return _MaPhuong; }
            set { _MaPhuong = value; }
        }

        public string MaDuong
        {
            get { return _MaDuong; }
            set { _MaDuong = value; }
        }

        public string NhanHieuText
        {
            get { return _NhanHieuText; }
            set { _NhanHieuText = value; }
        }

        public int NhanHieu
        {
            get { return _NhanHieu; }
            set { _NhanHieu = value; }
        }


        public string MoTaViTri
        {
            get { return _MoTaViTri; }
            set { _MoTaViTri = value; }
        }

        public string KCMiengPhun
        {
            get { return _KCMiengPhun; }
            set { _KCMiengPhun = value; }
        }

        public int SoLanSuCo
        {
            get { return _SoLanSuCo; }
            set { _SoLanSuCo = value; }
        }


        public string SoNha
        {
            get { return _SoNha; }
            set { _SoNha = value; }
        }

        public string NhaSanXuatText
        {
            get { return _NhaSanXuatText; }
            set { _NhaSanXuatText = value; }
        }


        public string DonViQLText
        {
            get { return _DonViQLText; }
            set { _DonViQLText = value; }
        }


        public string TinhTrangText
        {
            get { return _TinhTrangText; }
            set { _TinhTrangText = value; }
        }

        public string NuocSanXuatText
        {
            get { return _NuocSanXuatText; }
            set { _NuocSanXuatText = value; }
        }


        public string TieuChuanTruHongText
        {
            get { return _TieuChuanText; }
            set { _TieuChuanText = value; }
        }

        public string VatLieuText
        {
            get { return _VatLieuText; }
            set { _VatLieuText = value; }
        }


        public int SLMiengPhun
        {
            get { return _SLMiengPhun; }
            set { _SLMiengPhun = value; }
        }


        public int NhaSanXuat
        {
            get { return _NhaSanXuat; }
            set { _NhaSanXuat = value; }
        }


        public string GhiChu
        {
            get { return _GhiChu; }
            set { _GhiChu = value; }
        }


        public string IDHinhAnh
        {
            get { return _IDHinhAnh; }
            set { _IDHinhAnh = value; }
        }

        public string NguoiCNCuoi
        {
            get { return _NguoiCNCuoi; }
            set { _NguoiCNCuoi = value; }
        }


        public DateTime NgayCNCuoi
        {
            get { return _NgayCNCuoi; }
            set { _NgayCNCuoi = value; }
        }


        public int DonViQL
        {
            get { return _DonViQL; }
            set { _DonViQL = value; }
        }

        public int TinhTrang
        {
            get { return _TinhTrang; }
            set { _TinhTrang = value; }
        }


        public double ApLucHD
        {
            get { return _ApLucHD; }
            set { _ApLucHD = value; }
        }


        public int NamLapDat
        {
            get { return _NamLapDat; }
            set { _NamLapDat = value; }
        }

        public int NuocSanXuat
        {
            get { return _NuocSanXuat; }
            set { _NuocSanXuat = value; }
        }

        public int TieuChuanTruHong
        {
            get { return _TieuChuan; }
            set { _TieuChuan = value; }
        }
        
        public int VatLieu
        {
            get { return _VatLieu; }
            set { _VatLieu = value; }
        }
        
        public int OBJECTID
        {
            get { return _objectID; }
            set { _objectID = value; }
        }

        public string IDTruHong
        {
            get { return _IDTruHong; }
            set { _IDTruHong = value; }
        }

        public string IDDMZ
        {
            get { return _IDDMZ; }
            set { _IDDMZ = value; }
        }

        public string IDDMA
        {
            get { return _IDDMA; }
            set { _IDDMA = value; }
        }


        # endregion khai bao

        #region phuong thuc

        public TruHongEntities()
        {

        }

        public TruHongEntities(string IDTruHong, string IDDMZ,
         string IDDMA, string KichCo, string KieuDang, int LoaiTruHong, int VatLieu, int TieuChuanTruHong,
         int NhanHieu, int NhaSanXuat, int NuocSanXuat, int NamLapDat,
         int SLMiengPhun, string KCMiengPhun, string MoTaViTri, int TinhTrang,
         double ApLucHD,  int DonViQL,string SoNha, string MaDuong,
         string MaPhuong, string MaQuan, int ThuocSoHuu,
         int SoLanSuCo, DateTime NgayCNCuoi, string NguoiCNCuoi,
         string IDHinhAnh, string GhiChu)
        {
            //Begin Ninh Thuan
            this._IDTruHong = IDTruHong;
            this._IDDMZ = IDDMZ;
            this._IDDMA = IDDMA;
            this._KichCo = KichCo;
            this._KieuDang = KieuDang;
            this._VatLieu = VatLieu;
            this._TieuChuan = TieuChuanTruHong;
            this._NhanHieu = NhanHieu;
            this._NhaSanXuat = NhaSanXuat;
            this._NuocSanXuat = NuocSanXuat;
            this._NamLapDat = NamLapDat;
            this._ApLucHD = ApLucHD;
            this._SLMiengPhun = SLMiengPhun;
            this._MoTaViTri = MoTaViTri;
            this._TinhTrang = TinhTrang;
            this._DonViQL = DonViQL;
            this._KCMiengPhun = KCMiengPhun;
            this._SoNha = SoNha;
            this._MaDuong = MaDuong;
            this._MaPhuong = MaPhuong;
            this._MaQuan = MaQuan;
            this._LoaiTruHong = LoaiTruHong;
            this._ThuocSoHuu = ThuocSoHuu;
            this._SoLanSuCo = SoLanSuCo;
            this._NguoiCNCuoi = NguoiCNCuoi;
            this._NgayCNCuoi = NgayCNCuoi;
            this._GhiChu = GhiChu;
            this.IDHinhAnh = IDHinhAnh;
        }
        public TruHongEntities(int OBJECTID, string IDTruHong, string IDDMZ,
         string IDDMA, string KichCo, string KieuDang, int LoaiTruHong, int VatLieu, int TieuChuanTruHong,
         int NhanHieu, int NhaSanXuat, int NuocSanXuat, int NamLapDat,
         int SLMiengPhun, string KCMiengPhun, string MoTaViTri, int TinhTrang,
         double ApLucHD, int DonViQL, string SoNha, string MaDuong,
         string MaPhuong, string MaQuan, int ThuocSoHuu,
         int SoLanSuCo, DateTime NgayCNCuoi, string NguoiCNCuoi,
         string IDHinhAnh, string GhiChu)
        {
            this._objectID = OBJECTID;
            this._IDTruHong = IDTruHong;
            this._IDDMZ = IDDMZ;
            this._IDDMA = IDDMA;
            this._KichCo = KichCo;
            this._KieuDang = KieuDang;
            this._VatLieu = VatLieu;
            this._TieuChuan = TieuChuanTruHong;
            this._NhanHieu = NhanHieu;
            this._NhaSanXuat = NhaSanXuat;
            this._NuocSanXuat = NuocSanXuat;
            this._NamLapDat = NamLapDat;
            this._ApLucHD = ApLucHD;
            this._SLMiengPhun = SLMiengPhun;
            this._MoTaViTri = MoTaViTri;
            this._TinhTrang = TinhTrang;
            this._DonViQL = DonViQL;
            this._KCMiengPhun = KCMiengPhun;
            this._SoNha = SoNha;
            this._MaDuong = MaDuong;
            this._MaPhuong = MaPhuong;
            this._MaQuan = MaQuan;
            this._LoaiTruHong = LoaiTruHong;
            this._ThuocSoHuu = ThuocSoHuu;
            this._SoLanSuCo = SoLanSuCo;
            this._NguoiCNCuoi = NguoiCNCuoi;
            this._NgayCNCuoi = NgayCNCuoi;
            this._GhiChu = GhiChu;
            this.IDHinhAnh = IDHinhAnh;
        }

        public TruHongEntities(DataRow row)
        {
            this._objectID = Convert.ToInt32(row["OBJECTID"]);
            this._IDTruHong = row["IDTruHong"].ToString();
            this._IDDMA = row["IDDMA"].ToString();
            this._IDDMZ = row["IDDMZ"].ToString();
            this._KichCo = row["KichCo"].ToString();
            this._KieuDang = row["KieuDang"].ToString(); 
            this._VatLieuText = row["VatLieu"].ToString();
            if (row["TieuChuan"]!=null)
            this._TieuChuanText = row["TieuChuan"].ToString();
            this._NhanHieuText = row["NhanHieu"].ToString();
            this._NhaSanXuatText = row["NhaSanXuat"].ToString();
            this._NuocSanXuatText = row["NuocSanXuat"].ToString();
            if (row["NamLapDat"].ToString() != "Null")
                this._NamLapDat = Convert.ToInt32(row["NamLapDat"]);
            if (row["ApLucHD"].ToString() != "Null")
                this._ApLucHD = Convert.ToDouble(row["ApLucHD"]);
            if (row["SLMiengPhun"].ToString() != "Null")
                this._SLMiengPhun = Convert.ToInt32(row["SLMiengPhun"]);
            this._MoTaViTri = row["MoTaViTri"].ToString();
            this._TinhTrangText = row["TinhTrang"].ToString();
            if (row["DonViQL"].ToString() != "Null")
            this._DonViQLText = row["DonViQL"].ToString();
            this._KCMiengPhun = row["KCMiengPhun"].ToString();
            this._SoNha = row["SoNha"].ToString();
            this._MaDuong = row["MaDuong"].ToString();
            this._MaPhuong = row["MaPhuong"].ToString();
            this._MaQuan = row["MaQuan"].ToString();
            this._LoaiTruHongText = row["LoaiTruHong"].ToString();
            this._ThuocSoHuuText = row["ThuocSoHuu"].ToString();
            if (row["SoLanSuCo"].ToString() != "Null")
                this._SoLanSuCo = Convert.ToInt32(row["SoLanSuCo"]);

            if (row["NgayCNCuoi"].ToString() != "Null")
                this._NgayCNCuoi = Convert.ToDateTime(row["NgayCNCuoi"]);
            this._NguoiCNCuoi = row["NguoiCNCuoi"].ToString();
            this._IDHinhAnh = row["IDHinhAnh"].ToString();
            this._GhiChu = row["GhiChu"].ToString();
        }


        //public TruHongEntities TruHongIDataReader(IDataReader dr)
        //{
        //    BTGISWASECO.BusinessEntities.TruHongEntities obj = new BTGISWASECO.BusinessEntities.TruHongEntities();
        //    obj._objectID = (dr["ObjectID"] is DBNull) ? -1 : Convert.ToInt32(dr["ObjectID"]);
        //    obj._IDTruHong = (dr["IDTruHong"] is DBNull) ? string.Empty : dr["_IDTruHong"].ToString();
        //    obj._IDDMA = (dr["IDDMA"] is DBNull) ? string.Empty : dr["_IDDMA"].ToString();
        //    obj._ChieuDongTruHong = (Convert.ToInt32(dr["ChieuDongTruHong"]) >= 0) ? 0 : Convert.ToInt32(dr["ChieuDongTruHong"]);
        //    obj._SVDongTruHong = (dr["SVDongTruHong"] is DBNull) ? 0 : Convert.ToInt32(dr["SVDongTruHong"]);
        //    return obj;
        //}

        #endregion phuong thuc
    }
}